package com.iris.egrant.controller;

import com.iris.egrant.pojo.Emp;
import com.iris.egrant.service.IEmpService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhoukun
 * @since 2021-05-18
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("emp")
public class EmpController {
    private final IEmpService empService;

    @GetMapping("/{id}")
    public Emp getEmpById(@PathVariable Integer id) {
        return empService.getEmpById(id);
    }
}
